class CreateLocations < ActiveRecord::Migration
  def self.up
    create_table :locations do |t|
      # t.column :name, :string
      t.column :x, :integer
      t.column :y, :integer
    end
    # create a starter world of 10000 locations, 100 x 100
    100.times do |x|
      100.times do |y|
        Location.create(:x => x, :y => y)
      end
    end
  end

  def self.down
    drop_table :locations
  end
end
